package com.xindaoapp.happypet.utils;

import android.content.Context;

/**
 * 
 * SharedPreference的数据存储
 * 
 * @author chenghao
 */
public class MoccaPreferences {

    private static final PreferenceFile sPrefs = new PreferenceFile("xindaoapp",
            Context.MODE_PRIVATE);

    /**
     * 首页-控制小红点的显影
     */
    public static final PreferenceFile.SharedPreference<String> MeiTuTid = sPrefs.value(
            "meitu_tid", (String) null);
    public static final PreferenceFile.SharedPreference<String> HaoYouTid = sPrefs.value(
            "haoyou_tid", (String) null);

    /**
     * 是否显示录制视频的提示框
     */
    public static final PreferenceFile.SharedPreference<Boolean> IsShowDialogHint = sPrefs.value(
            "is_showDialog_hint", true);

    /**
     * 登录之后的Cookie（存键值对）
     */
    public static final PreferenceFile.SharedPreference<String> CookieData = sPrefs.value(
            "cookie_data", (String) null);

    /**
     * 已经登录的用户信息
     */
    public static final PreferenceFile.SharedPreference<String> UserInfo = sPrefs.value("userinfo",
            (String) null);

    /**
     * 是否为登录状态（用于下次启动是否自动登录）
     */
    public static final PreferenceFile.SharedPreference<Boolean> Logged = sPrefs.value("logged",
            false);

    public static final PreferenceFile.SharedPreference<String> UserName = sPrefs.value("username",
            (String) null);

    public static final PreferenceFile.SharedPreference<String> PassWord = sPrefs.value("password",
            (String) null);

    public static final PreferenceFile.SharedPreference<String> SINA_UID = sPrefs.value("uid",
            (String) null);

    public static final PreferenceFile.SharedPreference<String> SINA_ACCESS_TOKEN = sPrefs.value(
            "access_token", (String) null);

    public static final PreferenceFile.SharedPreference<String> WEIXIN_EXPIRES_IN = sPrefs.value(
            "expires_in ", (String) null);
    public static final PreferenceFile.SharedPreference<String> WEIXIN_OPENID = sPrefs.value(
            "openid", (String) null);
    public static final PreferenceFile.SharedPreference<String> WEIXIN_ACCESS_TOKEN = sPrefs.value(
            "weixin_access_token", (String) null);


    public static final PreferenceFile.SharedPreference<String> SINA_EXPIRES_IN = sPrefs.value(
            "expires_in", (String) null);

    public static final PreferenceFile.SharedPreference<String> SINA_USER_NAME = sPrefs.value(
            "sina_user_name", (String) null);
    public static final PreferenceFile.SharedPreference<String> WeiXin_USER_NAME = sPrefs.value(
            "weixin_user_name", (String) null);
    public static final PreferenceFile.SharedPreference<String> WEIXIN_USERPAREMS = sPrefs.value(
            "weixin_userparams", (String) null);

    // QQ登录 start
    public static final PreferenceFile.SharedPreference<String> QQ_CONUIN = sPrefs.value("conuin",
            (String) null);

    public static final PreferenceFile.SharedPreference<String> QQ_CONUINSECRET = sPrefs.value(
            "conuinsecret", (String) null);

    public static final PreferenceFile.SharedPreference<String> QQ_OPEN_ID = sPrefs.value(
            "qq_open_id", (String) null);

    public static final PreferenceFile.SharedPreference<String> QQ_USERPARM = sPrefs.value(
            "userparm", (String) null);

    /**
     * QQ昵称
     */
    public static final PreferenceFile.SharedPreference<String> QQ_NICKNAME = sPrefs.value(
            "qq_nick_name", (String) null);
    // QQ登录 end

    public static final PreferenceFile.SharedPreference<Integer> LOGIN_MODE = sPrefs.value(
            "login_mode", Constants.LOGINMODE.NONE.ordinal());

    /**
     * 发帖分享，微博登录状态
     */
    public static final PreferenceFile.SharedPreference<Boolean> SINA_WEIBO_LOGIN_STATE = sPrefs
            .value("sina_weibo_login_state", false);

    /**
     * 是否使用语音输入
     */
    public static final PreferenceFile.SharedPreference<Boolean> Iflytek = sPrefs.value(
            "show_iflytek_voice", true);
    /**
     * 配置文件存储当前手机屏幕宽度和高度，防止崩溃后无数据
     */
    public static final PreferenceFile.SharedPreference<Integer> sScreenWidth = sPrefs.value(
            "sScreenWidth", Constants.LOGINMODE.NONE.ordinal());
    public static final PreferenceFile.SharedPreference<Integer> sScreenHeight = sPrefs.value(
            "sScreenHeight", Constants.LOGINMODE.NONE.ordinal());


    /**
     * 是否显示引导图
     */
    public static final PreferenceFile.SharedPreference<Boolean> isGude = sPrefs.value("show_guid",
            true);

    public static PreferenceFile getPreferencesFile() {
        return sPrefs;
    }
}
